package com.liuceng.zen.service;

import com.liuceng.zen.mapper.FormMapper;
import com.liuceng.zen.mapper.LandingPageMapper;
import com.liuceng.zen.pojo.domain.Form;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by yanwen on 16-11-2.
 * FormService :
 */
@Service
@Data
public class FormService extends BaseService<Form>{
    @Value("${diy_Form_domain}")
    public String diyFormDomain;
    @Value("${main_domain}")
    public String mainDomain;
    @Autowired
    private FormMapper formMapper;
    /**
     * 删除
     * @return
     */
    public Integer delete(Integer formId){
        Map<String,Object> map=new HashMap<>();
        map.put("formId",formId);
        map.put("deletedAt",new Date());
        formMapper.delete(map);
        return formId;
    }

}
